#include "pch.h"
#include "GGiEngineUtil.h"
#include <mutex>

using namespace std;
float  GGiEngineUtil::GetMax() 
{
	return std::numeric_limits<float>::max();
}

float  GGiEngineUtil::GetMin() 
{
	return std::numeric_limits<float>::max();
}

float GGiEngineUtil::Clamp(const float& lo, const float& hi, const float& v)
{
	return std::max(lo, std::min(hi, v));
}

float GGiEngineUtil::GetRandom()
{
		thread_local std::random_device dev;
	std::mt19937 rng(dev());
	std::uniform_real_distribution<float> dist(0.f, 1.f); // distribution in range [1, 6]

	return dist(rng);
}